package com.a0soft.gphone.aTruffleHog.util;
/*
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 3, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * Copyright(C) 2011 
 *   Sam Lu <ysl.sam.lu (at) gmail.com>
 *
 */

import android.content.Context;
import android.content.res.Resources;

public class MccMnc {
    public static String
    GetCountryName(Context ctx, int nMCC)
    {
        Resources res = ctx.getResources();
        int nID = res.getIdentifier(
                    "mcc" + nMCC, 
                    "string", ctx.getPackageName());
      
        if (nID <= 0) {
            return CONSTS.UNKNOWN;
        }
      
        return res.getString(nID);
    }

    public static String
    GetNetworkName(Context ctx, int nMCC, int nMNC)
    {
        Resources res = ctx.getResources();
        int nID = res.getIdentifier(
                    "mnc" + nMCC + "_" + nMNC, 
                    "string", ctx.getPackageName());
      
        if (nID <= 0) {
            return CONSTS.UNKNOWN;
        }
      
        return res.getString(nID);
    }
}
